﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;
using System.Text;
using AwesomeSSPLSLogik;

namespace AwesomeWcf
{
    [ServiceContract]
    public interface IAwesome
    {

        [OperationContract]
        Boolean CheckPlayer (String playerName);

        [OperationContract]
        LPlayer LoginPlayer (string login, string password);

        [OperationContract]
        Boolean SetNamePlayer(String playerName);

        [OperationContract]
        List<LGameSession> GetGameSession(String playerName);

        [OperationContract]
        [WebInvoke( Method = "GET", BodyStyle = WebMessageBodyStyle.Wrapped, ResponseFormat = WebMessageFormat.Json)]
        List<LGame> GetGame();

        [OperationContract]
        List<LPlayer> GetAllPlayer();

        [OperationContract]
        Boolean CreateNonrandomGamesession(int playerId, int gameId, int rounds);

        [OperationContract]
        Boolean DeleteGameSession(int sessionId);

        [OperationContract]
        Boolean DeletePlayerSession(int playerId, int sessionId);

        [OperationContract]
        Boolean UpdateGameRounds(int id, int rounds);

        [OperationContract]
        Boolean AddPlayerSession(int playerId, int sessionId);

        [OperationContract]
        Boolean MakePlayerChoice(int gameSessionId, int playerId, int playerChoiceId);

        [OperationContract]
        List<LGameSession> GetAllActiveGameSessions();

        [OperationContract]
        List<LGameSession> GetAllJoinableGameSessions(int gameId);

        [OperationContract]
        List<LGameSession> GetPlayersGameSessions(int playerId);
    
    }


}
